﻿using UnityEngine;
using System.Collections;

public class Obstacle : MonoBehaviour {

	private GameManager m_gameManager;

	void Start ()
	{
		m_gameManager = (GameManager)Object.FindObjectsOfType(typeof(GameManager))[0];
	}
	
	void Update () {
	
	}

	void OnTriggerEnter(Collider other)
	{
		if (m_gameManager)
		{
			m_gameManager.Crashed();
		}
	}
}
